#ifndef __PWM_H__
#define __PWM_H__

#include "STC8A.h"

sbit PWM0_PIN = P2^0;
#define PWM0_CH 0

sbit PWM1_PIN = P2^1;
#define PWM1_CH 1

sbit HEN0_PIN = P4^2;
sbit HEN1_PIN = P4^1;

extern u16 pwm_set[2] ;     //8 bit
extern u16 pwm_act[2] ;     //10 bit

extern u8 hen_flag[2];

void Pwm_Start();

void PWM_init(u8 channel);

void PWM_set(u8 channel, u16 power);

#endif
